#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QListWidgetItem>
#include <QString>
#include <QFileDialog>
#include <QMainWindow>
#include <QtMultimedia/QMediaPlayer> // 包含头文件
#include<QTimer>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    QString settime(int time);

private slots:
    void on_btnPause_clicked();

    void on_btnPlay_clicked();

    void on_hSliderPlayProgress_sliderMoved(int position);
    void setSliderValue();

    void on_vSliderVolume_sliderMoved(int position);

    void on_btnAddMusic_clicked();

    void on_lwMusicList_itemDoubleClicked(QListWidgetItem *item);

    void on_btnPlayMusic_clicked();

    void on_btnPreMusic_clicked();

    void on_btnNextMusic_clicked();

    void on_btnVolume_clicked();

    void on_vSliderVolume_sliderReleased();
    void getduration();

    void setPlayTime();

private:
    Ui::MainWindow *ui;
    QMediaPlayer m_mediaPlayer;//实例化对象
    QTimer *timer;
    QString m_playPath;
    int m_PlayRow;
    int playtime;
};

#endif // MAINWINDOW_H
